﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Calc.aspx.cs" Inherits="WebCalculator.Calc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" type="text/css" href="Calc.css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hdnFirstNum" runat="server" />
    <asp:HiddenField ID="hdnOp" runat="server" />
    <div>
        <table class="Table" cellspacing="5" cellpadding="5">
            <tr>
                <td colspan="5" style="text-align:right; border:2px solid white; font-family:Arial; font-weight:bold; font-style:italic;  ">
                    <asp:Label ID="lblResult" runat="server" Text=""></asp:Label>   
                </td>
 
            </tr>
            <tr>
                <td style="text-align:center">
                    <asp:Button ID="btn7" runat="server" Text="7" onclick="btn7_Click" CssClass="NumberButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btn8" runat="server" Text="8" onclick="btn8_Click" CssClass="NumberButton" /> 
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btn9" runat="server" Text="9" onclick="btn9_Click" CssClass="NumberButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btnDivide" runat="server" Text="/" onclick="btnDivide_Click" CssClass="OperatorButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btnPercent" runat="server" Text="%" 
                        onclick="btnPercent_Click" CssClass="OperatorButton" />
                </td>
            </tr>

            <tr>
                <td style="text-align:center">
                    <asp:Button ID="btn4" runat="server" Text="4" onclick="btn4_Click" CssClass="NumberButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btn5" runat="server" Text="5" onclick="btn5_Click" CssClass="NumberButton" /> 
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btn6" runat="server" Text="6" onclick="btn6_Click" CssClass="NumberButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btnMultiply" runat="server" Text="*" 
                        onclick="btnMultiply_Click" CssClass="OperatorButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btnInvert" runat="server" Text="1/x" 
                        onclick="btnInvert_Click" CssClass="OperatorButton" />
                </td>
            </tr>
            <tr>
                <td style="text-align:center">
                    <asp:Button ID="btn1" runat="server" Text="1" onclick="btn1_Click" CssClass="NumberButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btn2" runat="server" Text="2" onclick="btn2_Click" CssClass="NumberButton" /> 
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btn3" runat="server" Text="3" onclick="btn3_Click" CssClass="NumberButton" />
                </td>
                <td style="text-align:center">
                    <asp:Button ID="btnSubtract" runat="server" Text="-" 
                        onclick="btnSubtract_Click" CssClass="OperatorButton" />
                </td>
                <td rowspan="2" style="text-align:center">
                    <asp:Button ID="btnEquals" runat="server" Text="=" onclick="btnEquals_Click" CssClass="EqualButton "  />
                </td>
            </tr>
            <tr>
                <td  style="text-align:center">
                    
                    <asp:Button ID="btn0" runat="server" Text="0" onclick="btn0_Click" CssClass="NumberButton" />
                    
                </td>
               <td style="text-align:center">
               <asp:Button ID="btnClear" runat="server" Text="C" CssClass="OperatorButton" 
                       onclick="btnClear_Click" />
               </td>
                <td style="text-align:center">
                    <asp:Button ID="btnDecimal" runat="server" Text="." 
                        onclick="btnDecimal_Click" CssClass="OperatorButton" />
                </td>
                <td style="text-align:center">
                   <asp:Button ID="btnAdd" runat="server" Text="+" onclick="btnAdd_Click" CssClass="OperatorButton" />
                </td>
 
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
